#ifndef VertexElement_h
#define VertexElement_h

#include <Defines.h>
#include <CSharpPropertyMethods.h>

// Riccsson includes.
#include <System/Object.h>
#include <System/Type.h>
#include <System/ArgumentException.h>
#include <System/ArgumentNullException.h>
#include <System/Array.h>
#include <System/Activator.h>

// XNA includes.
#include "VertexElementFormat.h"
#include "VertexElementUsage.h"

namespace Riccsson
{
	namespace Xna
	{
		namespace Framework
		{
			namespace Graphics
			{
				struct VertexElement
				{
					public: /*internal*/ int _offset;
					public: /*internal*/ VertexElementFormat _format;
					public: /*internal*/ VertexElementUsage _usage;
					public: /*internal*/ int _usageIndex;
							
					PROP3(VertexElement, int, Offset)
					PROP3(VertexElement, VertexElementFormat, vertexElementFormat)
					PROP3(VertexElement, VertexElementUsage, vertexElementUsage)
					PROP3(VertexElement, int, UsageIndex)

					public: PROP3_GET(int, Offset);
					public: PROP3_SET(int, Offset);
					public: PROP3_GET(VertexElementFormat, vertexElementFormat);
					public: PROP3_SET(VertexElementFormat, vertexElementFormat);
					public: PROP3_GET(VertexElementUsage, vertexElementUsage);
					public: PROP3_SET(VertexElementUsage, vertexElementUsage);
					public: PROP3_GET(int, UsageIndex);
					public: PROP3_SET(int, UsageIndex);
        
					COPY_CONSTRUCTOR(VertexElement)
					{
						PROP3_INIT_COPY(VertexElement, int, Offset);
						PROP3_INIT_COPY(VertexElement, VertexElementFormat, vertexElementFormat);
						PROP3_INIT_COPY(VertexElement, VertexElementUsage, vertexElementUsage);
						PROP3_INIT_COPY(VertexElement, int, UsageIndex);
					}

					public: VertexElement();
					public: VertexElement(int offset, VertexElementFormat elementFormat, VertexElementUsage elementUsage, int usageIndex);

					public: override int GetHashCode();
					public: override GC_PTR<Riccsson::System::string> ToString() const;
					public: override bool Equals(const Riccsson::System::object* obj);
				};

				inline bool operator ==(const VertexElement& left, const VertexElement& right)
				{
					return ((((left._offset == right._offset) && (left._usageIndex == right._usageIndex)) && (left._usage == right._usage)) && (left._format == right._format));
				}

				inline bool operator !=(const VertexElement& left, const VertexElement& right)
				{
					return !( ((((left._offset == right._offset) && (left._usageIndex == right._usageIndex)) && (left._usage == right._usage)) && (left._format == right._format)) );
				}
			}
		}
	}
}

#endif